﻿<script>
function validate(form)
{
	var ten =form.txtten_muc_tin.value;
	if(ten=="")
	{
		inlineMsg('txtten_muc_tin','Chưa nhập tên mục tin.',2);
		return false;
	}
	return true;
}
</script>
<div class="table"><h2><span>Thêm Mục Tin</span></h2></div><br />
<form action="muc_tin/luu_muc_tin.php" method="post"  name="frmThemmuctin" class="form" onsubmit="return validate(this)" enctype="multipart/form-data">
<table width="100%" cellpadding="0" cellspacing="0">
    <tr>
  <?php
  	$sql2= "SELECT * FROM the_loai_tin ORDER BY MS_LOAI_TIN";
	$rsloai= mysql_query($sql2);
  ?>
  	<td width="150"><label><strong>Tên thể loại</strong></label></td>
    <td><select name="cbo_loai_tin" id="cb_loai_tin" >
    <?php
	while ($rw=mysql_fetch_array($rsloai)){
	?>
    <option value="<?php echo $rw[0]; ?>"><?php echo $rw[0]; ?> - <?php echo $rw[1];?></option>
	<?php	
        }
	?>
    </select></td>
  </tr>
  <tr>
    <td><label><strong>Tên mục tin(*)</strong></label></td>
    <td>
      <input type="text" size="75" name="txtten_muc_tin" id="txtten_muc_tin" value=""/>
    </td>
  </tr> 
  <tr>
    <td></td>
	<td>
	<input type="submit" name="luu" id="luu" value="Lưu thông tin " class="button"/>
	<input type="reset" name="reset" id="reset" value="Nhập lại" class="button"/>&nbsp;&nbsp;&nbsp;
	<input type="button" name="back" id="back" value="Trở về" onclick="location.href='index.php?noidung=dsmt'" class="button"/>
	</td>
  </tr>
</table>
</form>